package model.semantics;

import java.util.List;

import model.State;
import model.TurtleState;

public class SingularOperation extends Operation<Integer> {

    public SingularOperation(String label) {
        super(0, label);
    }

    @Override
    protected Integer evaluateSafely(State<Integer> state, List<Integer> values) {
        return evaluateValue((TurtleState) state);
    }

    /**
     * Given a value, transform it into a new value.
     * 
     */
    protected Integer evaluateValue(TurtleState state) {
        return state.runCommand(myLabel.trim());
    }

}
